<template>
  <div class="hello">
      
   55555
   <button v-on:click="addshop">添加购物车</button>

  </div>
</template>

<script>
  export default {
    name: 'HelloWorld',
    props: {
      msg: String
    },
    mounted(){
      this.$bus.$on("addshop",this.addshop);
    },
    methods:{
      addshop(){
        alert("添加成功");      
      }
    }
  }
</script>

